package org.jeecg.modules.farming.product.mapper;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.farming.product.entity.ProductComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 供求产品-评价表
 * @Author: jeecg-boot
 * @Date:   2020-12-20
 * @Version: V1.0
 */
public interface ProductCommentMapper extends BaseMapper<ProductComment> {
    /** 查询-我的消息 */
    @Select("SELECT b.id,a.id as sdId,a.union_id as unionId,b.user_name as showName,b.user_id as userId,b.head_img_url as imgUrl,b.`status`,b.create_time as addTime,b.user_name as sendName,b.content as details FROM fa_product a INNER JOIN fa_product_comment b ON a.id = b.product_id WHERE a.union_id = #{unionId,jdbcType=VARCHAR}")
    public List<Map<String,Object>> getMyMessage(@Param("unionId") String unionId);
}
